package com.atguigu.client;

import com.atguigu.entity.CartInfo;
import com.atguigu.entity.PaymentInfo;
import com.atguigu.result.RetVal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "shop-payment")
public interface PaymentFeignClient {
    //支付宝的退款接口  http://127.0.0.1:8006/payment/refund/28
    @RequestMapping("/payment/refund/{orderId}")
    public RetVal refund(@PathVariable Long orderId);
    //关闭支付宝的交易接口
    @GetMapping("/payment/closeAlipayTrade/{orderId}")
    public boolean closeAlipayTrade(@PathVariable Long orderId);
    //查询支付宝的内部订单信息
    @RequestMapping("/payment/queryAlipayTrade/{orderId}")
    public boolean queryAlipayTrade(@PathVariable Long orderId);
    //通过商户订单号 out_trade_no  获取支付订单的信息
    @GetMapping("/payment/getPaymentInfo/{outTradeNo}")
    public PaymentInfo getPaymentInfo(@PathVariable String outTradeNo);
}
